<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100)->comment('姓名');
            $table->integer('uphone')->comment('手机号');
            $table->string('sheng')->comment('省级');
            $table->string('shi')->comment('市级');
            $table->string('city')->comment('县级');
            $table->text('deta')->comment('详细地址');
            $table->integer('user_id')->comment('用户的ID');
            $table->tinyInteger('default')->comment('默认与否');


            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('addresses');
    }
}
